//
//  WMEUserCollectionReusableView.m
//  everyDay_duiTang
//
//  Created by 恩叔 on 16/3/1.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMEUserCollectionReusableView.h"

@interface WMEUserCollectionReusableView ()
@property (nonatomic, retain)UIView *backView;
@property (nonatomic, retain)UILabel *line;
@property (nonatomic, retain)UILabel *line1;
@end
@implementation WMEUserCollectionReusableView

- (void)dealloc
{
    [_backView release];
    [_line1 release];
    [_line release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        //名字
        self.name = [[UILabel alloc] init];
        [self addSubview:_name];
        [_name release];
//        背景视图
        self.backView = [[UIView alloc] init];
        [self addSubview:_backView];
        [_backView release];
        //美观的线
        self.line = [[UILabel alloc] init];
        [self addSubview:_line];
        [_line release];
        //美观的线
        self.line1 = [[UILabel alloc] init];
        [self addSubview:_line1];
        [_line1 release];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    [super applyLayoutAttributes:layoutAttributes];
    _name.frame = CGRectMake(20, 5, WIDTH, 20);
    
    _backView.frame = CGRectMake(0, 0, WIDTH, 30);
    
    _line.frame = CGRectMake(0, 29, WIDTH, 0.3);
    
    _line1.frame = CGRectMake(0, 1, WIDTH, 0.3);
}
@end
